package t1;

public class MyClass {
    public int x=5;
    public int x1;

    //4、
    int x3;


    //3、
    static void myMethod(){
        System.out.println("我被执行了!");
    }

    //4、
    public MyClass(int y){
        System.out.println("构造MyClass");
        x3=y;
    }

    public MyClass(){

    }
    public static void main(String[] args){
        //1、
        MyClass myObj = new MyClass();
        System.out.println(myObj.x);

        //2、
        MyClass myObj2 = new MyClass();
        int y=40;
        myObj2.x1=y;
        System.out.println(myObj2.x1);



        //4、
        MyClass myObj3 = new MyClass(7);
        System.out.println(myObj3.x3);
    }

}
/*
1、输出：x=5

2、输出:x1=40


4、输出：构造MyClass  7

 */
